<!DOCTYPE html>
<script src='../../resources/testharness.js'></script>
<script src='../../resources/testharnessreport.js'></script>
<script src='../../resources/gesture-util.js'></script>
<style>
  #a {
    position: absolute;
    background-color: #def;
    left: 100px;
    top: 100px;
    width: 1000px;
    height: 1000px;
  }
</style>

<div id='a'></div>

<script>
  if (window.internals)
    internals.settings.setScrollAnimatorEnabled(false);

  window.onload = async () => {
    // Give rAFs ensure layer information has gone from Blink to CC's active tree.
    await waitForCompositorCommit();

    promise_test(async () => {
      await mouseClickOn(790, 500);
      // Will throw exception if window.scrollY not greater than 0.
      await waitFor(() => { return window.scrollY > 0; });
    }, 'Tests that the scrollbar can be clicked even when it clips absolute-positioned content.');
  }
</script>